package com.taorenqi.data.converter;


import org.json.JSONException;
import org.json.JSONObject;

import okhttp3.ResponseBody;
import retrofit2.Converter;
import java.io.IOException;
import java.net.URLDecoder;

/**
 * Created by eric on 2017/9/21.
 */

final class JsonResponseBodyConverter<T> implements Converter<ResponseBody, T> {

    JsonResponseBodyConverter() {

    }

    @Override
    public T convert(ResponseBody value) throws IOException {
//        JSONObject jsonObj;
//        try {
////            String response= Jiemi.GetDesDecrypt(URLDecoder.decode(value.string(), "utf-8"));
////            String strResult = response.substring(1,response.length() - 1);
////            jsonObj = new JSONObject(strResult);
////            return (T) jsonObj;
//            return null;
//        } catch(JSONException e) {
//            return null;
//        }
        return null;
    }
}